<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
<%@ page import="java.util.*" %>

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <link type="text/css" rel="stylesheet" href="Fitweb.css">

    <title>Fit 4 Health webpages</title>

    <script type="text/javascript" language="javascript" src="fitweb/fitweb.nocache.js"></script>
  </head>
  <body>

    <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>

    <noscript>
      <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
        Your web browser must have JavaScript enabled
        in order for this application to display correctly.
      </div>
    </noscript>

<%
/*
  Map<String, String> openIdProviders = new HashMap<String, String>();
  openIdProviders.put("Google", "google.com/accounts/o8/id");
  openIdProviders.put("Yahoo", "yahoo.com");
  openIdProviders.put("MySpace", "myspace.com");
  openIdProviders.put("AOL", "aol.com");
  openIdProviders.put("MyOpenId.com", "myopenid.com");
  
    UserService userService = UserServiceFactory.getUserService();
    try {
      User user = userService.getCurrentUser();
      */
%>
<p>Hello, <%-- user.getNickname() --%>! (You can
<a href="<%-- userService.createLogoutURL(request.getRequestURI()) --%>">sign out</a>.)</p>
<%
/*
    } catch (Exception e) {
    */
%>
<p>Hello! Sign in at:
<%
/*
            Set<String> attributes = new HashSet();

            for (String providerName : openIdProviders.keySet()) {
                String providerUrl = openIdProviders.get(providerName);
                String loginUrl = userService.createLoginURL(request
                        .getRequestURI(), null, providerUrl, attributes);
                out.println("[<a href=\"" + loginUrl + "\">" + providerName + "</a>] ");
            }
            */
%>            
<%
//    }
%>

    <h1>Fit 4 Health WEB</h1>

    <div id="tabBar"></div>

    <div id="content"></div>

  </body>
</html>
